import 'package:flutter/material.dart';

abstract class LoginBaseViewModel extends ChangeNotifier {
  bool _isProtected = false;

  bool get isProtected => _isProtected;

  set isProtected(bool value) {
    if (value != _isProtected) {
      _isProtected = value;
      notifyListeners();
    }
  }

  bool _loginEnable = false;

  bool get loginEnable => _loginEnable;

  set loginEnable(bool value) {
    if (value != _loginEnable) {
      _loginEnable = value;
      notifyListeners();
    }
  }

  BuildContext? context;

  void bindContext(BuildContext context) {
    this.context = context;
  }

  /// 发送请求
  void sendUserRequest(String userName, String password, {String? imoocId, String? orderId});
}
